﻿<!-- #include file="mymin.asp" -->
<%
Call Head()
w "<card title='评论管理'><p>"

dim rs,sql,exsql
set rs=server.createobject("adodb.recordset")
exsql=""
If key=2 And keyids<>"" Then exsql="where j.classid in ("&keyids&")"
sql="Select h.id,h.ip,h.smsid,h.pl,h.pltime,j.classid,j.title from 74hu_pl h left join 74hu_article j on h.smsid=j.id "&exsql&" order by h.id desc"

rs.open sql,myconn,1,1
If Not rs.eof Then
	Dim pagesize,count,page,i
	PageSize=10
	Count=rs.recordcount
	page=getN("page",1)
	if page<1 then page=1
	pagecount=(count+pagesize-1)\pagesize
	if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize
		If rs.eof Then Exit For
		smsid=rs("smsid")
		plid=rs("id")
		plip=rs("ip")
		plnr=rs("pl")
		plsj=rs("pltime")
		id = smsid
		ids = rs("classid")
		title = rs("title")
		If rs.eof Then Exit For
%><%=i+(page-1)*PageSize%>、评论文章：<a href="smsview.asp?sid=<%=sid%>&amp;id=<%=id%>&amp;ids=<%=ids%>&amp;TP=1"><%=noubb(title)%></a><br/>评论者IP：<%=plip%><br/>时间：<%=fordate2(plsj)%><br/>内容：<%=noubb(plnr)%><br/><a href="delpl.asp?sid=<%=sid%>&amp;id=<%=plid%>">[删除这条评论]</a><br/><%
		rs.moveNext
	Next
	w showPage("adminpl.asp", "", page, pageCount)
Else
	w "暂时没有评论！"
end if
rs.close
set rs=nothing

If key=0 Then w "<br/><a href='qkpin.asp?sid="&sid&"'>[清空评论]</a>"

Call Last%>